3.4.53 \(\int (f x)^{-1+m} (d+e x^m) (a+b \log (c x^n)) \, dx\) [353]

Optimal. Leaf size=90 \[ -\frac {b d n (f x)^m}{f m^2}-\frac {b e n x^m (f x)^m}{4 f m^2}+\frac {d (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m}+\frac {e x^m (f x)^m \left (a+b \log \left (c x^n\right )\right )}{2 f m} \]

[Out]

-b*d*n*(f*x)^m/f/m^2-1/4*b*e*n*x^m*(f*x)^m/f/m^2+d*(f*x)^m*(a+b*ln(c*x^n))/f/m+1/2*e*x^m*(f*x)^m*(a+b*ln(c*x^n
))/f/m

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 113, normalized size of antiderivative = 1.26, number of steps used = 5, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {2377, 2376, 272, 45} \begin {gather*} \frac {x^{1-m} (f x)^{m-1} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {b d^2 n x^{1-m} \log (x) (f x)^{m-1}}{2 e m}-\frac {b d n x (f x)^{m-1}}{m^2}-\frac {b e n x^{m+1} (f x)^{m-1}}{4 m^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f*x)^(-1 + m)*(d + e*x^m)*(a + b*Log[c*x^n]),x]

[Out]

-((b*d*n*x*(f*x)^(-1 + m))/m^2) - (b*e*n*x^(1 + m)*(f*x)^(-1 + m))/(4*m^2) - (b*d^2*n*x^(1 - m)*(f*x)^(-1 + m)
*Log[x])/(2*e*m) + (x^(1 - m)*(f*x)^(-1 + m)*(d + e*x^m)^2*(a + b*Log[c*x^n]))/(2*e*m)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2376

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :
> Simp[f^m*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])^p/(e*r*(q + 1))), x] - Dist[b*f^m*n*(p/(e*r*(q + 1))), Int[
(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[
m, r - 1] && IGtQ[p, 0] && (IntegerQ[m] || GtQ[f, 0]) && NeQ[r, n] && NeQ[q, -1]

Rule 2377

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :>
 Dist[(f*x)^m/x^m, Int[x^m*(d + e*x^r)^q*(a + b*Log[c*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r},
 x] && EqQ[m, r - 1] && IGtQ[p, 0] &&  !(IntegerQ[m] || GtQ[f, 0])

Rubi steps

\begin {align*} \int (f x)^{-1+m} \left (d+e x^m\right ) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\left (x^{1-m} (f x)^{-1+m}\right ) \int x^{-1+m} \left (d+e x^m\right ) \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \int \frac {\left (d+e x^m\right )^2}{x} \, dx}{2 e m}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \text {Subst}\left (\int \frac {(d+e x)^2}{x} \, dx,x,x^m\right )}{2 e m^2}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \text {Subst}\left (\int \left (2 d e+\frac {d^2}{x}+e^2 x\right ) \, dx,x,x^m\right )}{2 e m^2}\\ &=-\frac {b d n x (f x)^{-1+m}}{m^2}-\frac {b e n x^{1+m} (f x)^{-1+m}}{4 m^2}-\frac {b d^2 n x^{1-m} (f x)^{-1+m} \log (x)}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 61, normalized size = 0.68 \begin {gather*} \frac {(f x)^m \left (2 a m \left (2 d+e x^m\right )-b n \left (4 d+e x^m\right )+2 b m \left (2 d+e x^m\right ) \log \left (c x^n\right )\right )}{4 f m^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^(-1 + m)*(d + e*x^m)*(a + b*Log[c*x^n]),x]

[Out]

((f*x)^m*(2*a*m*(2*d + e*x^m) - b*n*(4*d + e*x^m) + 2*b*m*(2*d + e*x^m)*Log[c*x^n]))/(4*f*m^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.10, size = 425, normalized size = 4.72

method result size
risch \(\frac {b \left (e \,x^{m}+2 d \right ) x \,{\mathrm e}^{\frac {\left (-1+m \right ) \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}} \ln \left (x^{n}\right )}{2 m}-\frac {\left (i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x^{m} m -i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{m} m -i \pi b e \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{m} m +i \pi b e \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x^{m} m +2 i \pi b d m \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-2 i \pi b d m \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b d m \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi b d m \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (c \right ) b e \,x^{m} m -4 \ln \left (c \right ) b d m -2 x^{m} a e m +x^{m} b e n -4 a d m +4 b d n \right ) x \,{\mathrm e}^{\frac {\left (-1+m \right ) \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}}}{4 m^{2}}\) \(425\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(-1+m)*(d+e*x^m)*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/2*b*(e*x^m+2*d)*x/m*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn
(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))*ln(x^n)-1/4*(I*Pi*b*e*csgn(I*c)*csgn(I*x^n)*csgn(
I*c*x^n)*x^m*m-I*Pi*b*e*csgn(I*c)*csgn(I*c*x^n)^2*x^m*m-I*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*x^m*m+I*Pi*b*e*cs
gn(I*c*x^n)^3*x^m*m+2*I*Pi*b*d*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*m-2*I*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)^2*m-2*
I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2*m+2*I*Pi*b*d*csgn(I*c*x^n)^3*m-2*ln(c)*b*e*x^m*m-4*ln(c)*b*d*m-2*x^m*a*e*
m+x^m*b*e*n-4*a*d*m+4*b*d*n)*x/m^2*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(
I*f*x)^2*csgn(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 115, normalized size = 1.28 \begin {gather*} -\frac {b d f^{m - 1} n x^{m}}{m^{2}} + \frac {b f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )} \log \left (c x^{n}\right )}{2 \, m} + \frac {a f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )}}{2 \, m} - \frac {b f^{m - 1} n e^{\left (2 \, m \log \left (x\right ) + 1\right )}}{4 \, m^{2}} + \frac {\left (f x\right )^{m} b d \log \left (c x^{n}\right )}{f m} + \frac {\left (f x\right )^{m} a d}{f m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-b*d*f^(m - 1)*n*x^m/m^2 + 1/2*b*f^(m - 1)*e^(2*m*log(x) + 1)*log(c*x^n)/m + 1/2*a*f^(m - 1)*e^(2*m*log(x) + 1
)/m - 1/4*b*f^(m - 1)*n*e^(2*m*log(x) + 1)/m^2 + (f*x)^m*b*d*log(c*x^n)/(f*m) + (f*x)^m*a*d/(f*m)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 80, normalized size = 0.89 \begin {gather*} \frac {{\left (2 \, b m n e \log \left (x\right ) + 2 \, b m e \log \left (c\right ) + {\left (2 \, a m - b n\right )} e\right )} f^{m - 1} x^{2 \, m} + 4 \, {\left (b d m n \log \left (x\right ) + b d m \log \left (c\right ) + a d m - b d n\right )} f^{m - 1} x^{m}}{4 \, m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

1/4*((2*b*m*n*e*log(x) + 2*b*m*e*log(c) + (2*a*m - b*n)*e)*f^(m - 1)*x^(2*m) + 4*(b*d*m*n*log(x) + b*d*m*log(c
) + a*d*m - b*d*n)*f^(m - 1)*x^m)/m^2

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 445 vs. \(2 (80) = 160\).
time = 16.53, size = 445, normalized size = 4.94 \begin {gather*} \begin {cases} \tilde {\infty } \left (d + e\right ) \left (a x - b n x + b x \log {\left (c x^{n} \right )}\right ) & \text {for}\: f = 0 \wedge m = 0 \\\frac {\left (d + e\right ) \left (\begin {cases} a \log {\left (x \right )} & \text {for}\: b = 0 \\- \left (- a - b \log {\left (c \right )}\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\left (- a - b \log {\left (c x^{n} \right )}\right )^{2}}{2 b n} & \text {otherwise} \end {cases}\right )}{f} & \text {for}\: m = 0 \\0^{m - 1} \left (\frac {a d m^{2} x}{m^{2} + 2 m + 1} + \frac {2 a d m x}{m^{2} + 2 m + 1} + \frac {a d x}{m^{2} + 2 m + 1} + \frac {a e m x x^{m}}{m^{2} + 2 m + 1} + \frac {a e x x^{m}}{m^{2} + 2 m + 1} - \frac {b d m^{2} n x}{m^{2} + 2 m + 1} + \frac {b d m^{2} x \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {2 b d m n x}{m^{2} + 2 m + 1} + \frac {2 b d m x \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {b d n x}{m^{2} + 2 m + 1} + \frac {b d x \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} + \frac {b e m x x^{m} \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {b e n x x^{m}}{m^{2} + 2 m + 1} + \frac {b e x x^{m} \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1}\right ) & \text {for}\: f = 0 \\\frac {a d \left (f x\right )^{m}}{f m} + \frac {a e x^{m} \left (f x\right )^{m}}{2 f m} + \frac {b d \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m} - \frac {b d n \left (f x\right )^{m}}{f m^{2}} + \frac {b e x^{m} \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{2 f m} - \frac {b e n x^{m} \left (f x\right )^{m}}{4 f m^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**(-1+m)*(d+e*x**m)*(a+b*ln(c*x**n)),x)

[Out]

Piecewise((zoo*(d + e)*(a*x - b*n*x + b*x*log(c*x**n)), Eq(f, 0) & Eq(m, 0)), ((d + e)*Piecewise((a*log(x), Eq
(b, 0)), (-(-a - b*log(c))*log(x), Eq(n, 0)), ((-a - b*log(c*x**n))**2/(2*b*n), True))/f, Eq(m, 0)), (0**(m -
1)*(a*d*m**2*x/(m**2 + 2*m + 1) + 2*a*d*m*x/(m**2 + 2*m + 1) + a*d*x/(m**2 + 2*m + 1) + a*e*m*x*x**m/(m**2 + 2
*m + 1) + a*e*x*x**m/(m**2 + 2*m + 1) - b*d*m**2*n*x/(m**2 + 2*m + 1) + b*d*m**2*x*log(c*x**n)/(m**2 + 2*m + 1
) - 2*b*d*m*n*x/(m**2 + 2*m + 1) + 2*b*d*m*x*log(c*x**n)/(m**2 + 2*m + 1) - b*d*n*x/(m**2 + 2*m + 1) + b*d*x*l
og(c*x**n)/(m**2 + 2*m + 1) + b*e*m*x*x**m*log(c*x**n)/(m**2 + 2*m + 1) - b*e*n*x*x**m/(m**2 + 2*m + 1) + b*e*
x*x**m*log(c*x**n)/(m**2 + 2*m + 1)), Eq(f, 0)), (a*d*(f*x)**m/(f*m) + a*e*x**m*(f*x)**m/(2*f*m) + b*d*(f*x)**
m*log(c*x**n)/(f*m) - b*d*n*(f*x)**m/(f*m**2) + b*e*x**m*(f*x)**m*log(c*x**n)/(2*f*m) - b*e*n*x**m*(f*x)**m/(4
*f*m**2), True))

________________________________________________________________________________________

Giac [A]
time = 4.09, size = 150, normalized size = 1.67 \begin {gather*} \frac {b d f^{m} n x^{m} \log \left (x\right )}{f m} + \frac {b f^{m} n x^{2 \, m} e \log \left (x\right )}{2 \, f m} + \frac {b d f^{m} x^{m} \log \left (c\right )}{f m} + \frac {b f^{m} x^{2 \, m} e \log \left (c\right )}{2 \, f m} + \frac {a d f^{m} x^{m}}{f m} - \frac {b d f^{m} n x^{m}}{f m^{2}} + \frac {a f^{m} x^{2 \, m} e}{2 \, f m} - \frac {b f^{m} n x^{2 \, m} e}{4 \, f m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*d*f^m*n*x^m*log(x)/(f*m) + 1/2*b*f^m*n*x^(2*m)*e*log(x)/(f*m) + b*d*f^m*x^m*log(c)/(f*m) + 1/2*b*f^m*x^(2*m)
*e*log(c)/(f*m) + a*d*f^m*x^m/(f*m) - b*d*f^m*n*x^m/(f*m^2) + 1/2*a*f^m*x^(2*m)*e/(f*m) - 1/4*b*f^m*n*x^(2*m)*
e/(f*m^2)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (f\,x\right )}^{m-1}\,\left (d+e\,x^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(m - 1)*(d + e*x^m)*(a + b*log(c*x^n)),x)

[Out]

int((f*x)^(m - 1)*(d + e*x^m)*(a + b*log(c*x^n)), x)

________________________________________________________________________________________